Skip to content

feat: add AgentRunner, AgentGraphRunner ABCs and result types (PR-4)#103

Merged
jsonbailey merged 2 commits intomainfrom
jb/aic-1664/runner-abcs
Mar 26, 2026
Merged

feat: add AgentRunner, AgentGraphRunner ABCs and result types (PR-4)#103
jsonbailey merged 2 commits intomainfrom
jb/aic-1664/runner-abcs

Conversation

@jsonbailey
Copy link
Copy Markdown
Contributor

@jsonbailey jsonbailey commented Mar 11, 2026

Adds the runner ABCs and result types needed to support agent and agent graph execution in later PRs:

  • ldai/runners/agent_runner.py: AgentRunner ABC with run(input) -> AgentResult
  • ldai/runners/agent_graph_runner.py: AgentGraphRunner ABC with run(input) -> AgentGraphResult
  • ldai/runners/types.py: AgentResult, AgentGraphResult (output, raw, metrics), ToolRegistry alias
  • Exports all new types from ldai top-level init.py

Note

Low Risk
Mostly additive type/interface work (new Protocols, result dataclasses, exports) with a small behavioral surface change from ModelRunner ABC to runtime-checkable Protocol, which could affect isinstance checks but is covered by tests.

Overview
Introduces new runtime capability interfaces for agent execution: AgentRunner and AgentGraphRunner (async run()), along with corresponding AgentResult/AgentGraphResult dataclasses and a ToolRegistry type alias.

Refactors ModelRunner from an abstract base class to a runtime-checkable Protocol, and re-exports the new types from ldai.providers and top-level ldai for public consumption; adds unit tests validating structural typing and exports.

Written by Cursor Bugbot for commit af50590. This will update automatically on new commits. Configure here.

@jsonbailey jsonbailey changed the title feat: add AgentRunner, AgentGraphRunner ABCs and result types feat: add AgentRunner, AgentGraphRunner ABCs and result types (PR-4) Mar 11, 2026
@jsonbailey jsonbailey force-pushed the jb/aic-1664/runner-abcs branch from db27c82 to ed8787a Compare March 11, 2026 18:38
@jsonbailey jsonbailey force-pushed the jb/aic-1664/adapter-executor-factory branch from 4bef65c to e10be52 Compare March 25, 2026 14:33
Base automatically changed from jb/aic-1664/adapter-executor-factory to main March 25, 2026 17:20
@jsonbailey jsonbailey force-pushed the jb/aic-1664/runner-abcs branch from ed8787a to e2df180 Compare March 25, 2026 20:21
@jsonbailey jsonbailey changed the base branch from main to jb/aic-1664/managed-model March 25, 2026 20:23
@jsonbailey jsonbailey marked this pull request as ready for review March 25, 2026 21:01
@jsonbailey jsonbailey requested a review from a team as a code owner March 25, 2026 21:01
Base automatically changed from jb/aic-1664/managed-model to main March 26, 2026 14:10
Adds the runner ABCs and result types needed to support agent and
agent graph execution in later PRs:

- ldai/runners/agent_runner.py: AgentRunner ABC with run(input) -> AgentResult
- ldai/runners/agent_graph_runner.py: AgentGraphRunner ABC with run(input) -> AgentGraphResult
- ldai/runners/types.py: AgentResult, AgentGraphResult (output, raw, metrics), ToolRegistry alias
- Exports all new types from ldai top-level __init__.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jsonbailey jsonbailey force-pushed the jb/aic-1664/runner-abcs branch from e2df180 to ff3022e Compare March 26, 2026 14:31
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

…iders namespace

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jsonbailey jsonbailey merged commit 9b6f06a into main Mar 26, 2026
45 checks passed
@jsonbailey jsonbailey deleted the jb/aic-1664/runner-abcs branch March 26, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants